home *** CD-ROM | disk | FTP | other *** search
- From: Jim Crammond <seismo!mcvax!cs.hw.ac.uk!jim>
- Subject: Sendmail UK-1.4 part 1 of 5
- Newsgroups: mod.sources
- Approved: jpn@panda.UUCP
-
- Mod.sources: Volume 4, Issue 56
- Submitted by: Jim Crammond <seismo!mcvax!cs.hw.ac.uk!jim>
-
-
- # This is a shell archive.
- # Remove everything above and including the cut line.
- # Then run the rest of the file through sh.
- -----cut here-----cut here-----cut here-----cut here-----
- #!/bin/sh
- # shar: Shell Archiver
- # Run the following text with /bin/sh to create:
- # README
- # Upgrade
- # MAKE
- # Mailers.a
- # Rules.a
- # This archive created: Fri Feb 28 13:12:52 1986
- echo shar: extracting README '(9615 characters)'
- cat << \SHAR_EOF > README
- Sendmail Configuration Package UK-1.4
- ======== ============= ======= ======
-
- Overview
- --------
- This package provides you with tools to generates a fully domain based
- sendmail configuration file from domain and channel tables in a format
- similar to that used by MMDF.
-
- The configuration essentially comprises of three parts: the domain tables,
- the channel tables and the mailer specifications. The following diagram
- shows how all three pieces fit together.
-
- ----------- [ mailer, ]
- | channel |-->[ host, ]
- ---------- fully qualified /| tables | [ transport ]
- incoming | domain | domain addresses / ----------- [ addresses ]
- addresses -->| tables |--------->---------<
- ---------- \ -----------
- \| mailer | header
- | specs |---> addresses
- -----------
-
- The domain tables convert addresses given to sendmail into fully qualified
- domain addresses; these are then passed to the channel tables which select
- the <network, host, transport address> triple required for message delivery.
-
- The domain addresses are then passed to the mailer specifications where
- they are converted to a form suitable for the mail headers for that
- particular network.
-
- Anyone who has read the Sendmail Implementation Guide should recognise
- the similarity between this and the rulesets diagram. Basically, the
- domain tables correspond to ruleset 3, the channel tables to ruleset 0
- and the mailer specifications to the mailer specific rulesets.
-
- This README will hopefully explain how to build these pieces and thus
- generate a configuration file.
-
- The package also contains a number of support programs that often provide
- a better interface between mail transport protocols and sendmail than the
- "standard" programs.
-
-
- Addresses
- ---------
- This configuration file accepts addresses in any of the standard forms:
-
- RFC822 style: @domain1,@domain2:user@domain3
- Percent style: user%domain3%domain2@domain1
- UUCP style: domain1!domain2!domain3!user
-
- If you define "NRS format", then the GreyBook big-endian domain name
- ordering is also understood.
-
- Mixed addresses are handled by using the precedence order '@' > '%' > '!'
- e.g. domc!user%domb@doma => user%domc%domb@doma <=> doma!domb!domc!user
-
-
- Mailers
- -------
- The following mailers are supported:
-
- local the standard unix local mailer
- ether mail over the ethernet
- luucp local uucp mail (uses domain addressing)
- uucp external uucp mail
- janet janet mail, using hhcp
- bitnet bitnet mail, using rscs
- csnet csnet mail, using pmdf
-
-
- Files
- -----
- The configuration file is generated from a set of m4 files:
- Site independent:
- base.m4 Defines special macros, options and headers etc.
- version.m4 Gives the version number and history.
- rules.m4 Defines the standard rulesets.
- rules1.m4 Defines rulesets to do address conversions.
- <mailer>m.m4 Mailer specifications - one for each mailer above.
-
- Site dependent:
- <site>.dom Defines the domain information and conversion rules.
-
- Host dependent:
- <host>.mc Defines some macros and reads everything else in.
- <host>.chn Defines the routing information and rules.
-
-
- Domain and Channel Tables
- -------------------------
- The <site>.dom and <host>.chn files are "compiled" from domain and channel
- tables in the "dom" and "chn" directories respectively. Both of these
- directories contain README files which explain how to create these tables.
-
-
- Support programs
- ----------------
- The support directory contains various programs that interface with sendmail.
- More details about these can be found in the README in the "Support" directory.
-
-
- Names
- -----
- The initial MAKE program (see below) requires you to specify three
- names for making a configuration file:
- a) a host name
- b) a site name
- c) a domain name
-
- The host and site names are simply used to determine the names of the
- site and host dependent files to include into the configuration file.
-
- The domain name should be your official name registered with some
- recognised administrative body such as the NRS; e.g. "cs.hw.ac.uk".
- Failing that, it maybe a network based domain name, e.g. "hwcs.UUCP".
-
- The initial MAKE program will allow you to specify different domain
- names on different mailer channels, if desired. Note, however, that
- you should only have one official domain name and you should use that
- whereever possible.
-
-
- Multihost configuration
- -----------------------
- If you are a site which has a collection of machines, you will probably
- want to "hide" the machines behind one site domain name.
-
- This will mean that people will send mail to the site, and let the sendmail
- on whichever machine it was received on, route the mail to the appropriate
- machine for that user.
-
- Conceptually, this is done by making each of the hosts a subdomain of the
- site domain and then making each host recognise both the site domain and
- the host specific domain name as "local".
-
- For example, the site domain "cs.hw.ac.uk" may have the subdomains "vax1"
- "vax2" and "vax6". On vax1, the domains "cs.hw.ac.uk" and "vax1.cs.hw.ac.uk"
- are recognised as local, whilst on vax6 the domains "cs.hw.ac.uk" and
- "vax6.cs.hw.ac.uk" are recognised as local. The host specific names allow
- mail to be routed to specific hosts within the site.
-
- To make a multihost configuration, you should specify the multihost option
- when prompted by the initial MAKE program, and configure the local channel
- table appropriately (see the example local channel table in the "chn"
- directory). Also, you will need to setup user aliases to route users' mail
- to their desired hosts (see below).
-
-
- Installation
- ------------
- 1. Run "MAKE".
-
- This creates a directory containing all the rules and mailer m4 files
- required for a host configuration and creates the <host>.mc file.
-
- MAKE will first ask for your host, site and domain names, and whether
- you are doing a multi-host site configuration.
-
- MAKE will then prompt for the mailers to include in the configuration.
-
- If you define the Janet mailer, then understanding NRS (big-endian)
- format addresses will automatically be included in the configuration;
- otherwise MAKE will ask you if you wish them to be recognised.
-
- Finally it creates all the files.
-
- 2. "cd" to directory dom.
- Here you must setup the domain tables from which the <site>.dom file
- is generated.
-
- There is only one of these per site, so if you have already done this
- on another host, just copy the tables to this host.
-
- More details are found in the README contained in the "dom" directory.
-
- 3. "cd" to directory chn
- Here you must setup the channel tables which give all the routing
- information from which the <host>.chn file is generated.
-
- More details are found in the README contained in the "chn" directory.
-
- 4. "cd" to the <host> directory.
- Run "make" to produce the <host>.cf file.
- This can be tested by using "sendmail -bt -C<host>.cf" - if you haven't
- used this before then see the sendmail documentation for details.
-
- 5. Check that the mailer specification files have the correct
- pathnames and options to the mailers, particularly the local mailer!
-
- 6. Install any appropriate mailer interfaces that you need from the
- "Support" directory.
-
- 7. As superuser, run "make install" to install this. If you have a
- sendmail daemon running (typically: /usr/lib/sendmail -bd -q1h),
- then kill it and start a new one.
-
-
- Aliases
- -------
- Central to the success of the multihost configuration is the use of sendmail's
- aliases feature to determine which host a user's mail should be delivered to.
- The recommended scheme is to have a common set of aliases on all hosts
- containing all users and the host addresses to which their mail should be
- delivered, e.g.
- jim: jim@vax1
- fred: fred@vax2
-
- All addresses considered "local" are subject to aliasing. So, if the aliases
- file on vax2 contains the above entries, mail to "jim@vax2" will be forwarded
- from vax2 to vax1. Aliases can, however, be overridden by prepending a '~' to
- the user part of the address, so "~jim@vax2" will be delivered on vax2.
-
-
- Running shared configuration files
- ----------------------------------
- If you are running a multihost configuration, where several machines
- have an identical view of the network then you can run the same
- configuration files on those machines.
-
- Remember that the two host dependent files that make up the configuration
- file are the <host>.mc and <host>.chn files. For machines that use the
- same mailers, the <host>.mc file will be identical (except for the hostname
- definition which determines the name of the <host>.chn file).
-
- So, only the <host>.chn file requires special attention to make it usable
- by several machines. This is explained in further detail in the README
- in the "chn" directory.
-
- Note that when prompted for hostname in the initial MAKE program, you can
- either specify one particular host's name, or use a generic name such as
- "workstations".
-
-
- Upgrading from UK-1.2 & UK-1.3
- ------------------------------
- If you already run UK-1.2 or UK-1.3, then you should read the file "Upgrade"
- in this directory which gives a guide on how to upgrade to UK-1.4.
-
-
- --------
- Mail bugs and comments to: JANET: uk-sendmail-workers@uk.ac.hw.cs
- ARPA: uk-sendmail-workers@cs.hw.ac.uk
- UUCP: ..!ukc!cs.hw.ac.uk!uk-sendmail-workers
-
-
- -Jim Crammond, Heriot-Watt University, Edinburgh. 12.2.86
- SHAR_EOF
- if test 9615 -ne "`wc -c README`"
- then
- echo shar: error transmitting README '(should have been 9615 characters)'
- fi
- echo shar: extracting Upgrade '(3876 characters)'
- cat << \SHAR_EOF > Upgrade
- Here is a brief history on the changes from UK-1.2 to UK-1.4.
-
- UK-1.3 changes
- ==============
- dom/MAKE: The list of top level domains can be generated from a
- file top.dom which has the same format as the top.chn
- in the channel tables.
- Also, some obsolete code has been removed.
- dom/Namecheck: This is a new program to check tables for name clashes.
- chn/MAKE: Changes to make the janet "general rule" fire only after
- all specific rules failed to match.
- MAKE: Added NRSFORMAT definition, so that non-Janet hosts can
- understand big-endian format.
- Rules.a: Added options for sendmail 4.40.
- Support/muucp: Added OnlyGrade option for use with ukuucp.
-
- Domain Literals
- ---------------
- A number of changes have been made to cater for the use of domain literals
- in addresses, for Janet mailers. This includes modifications to mailer.c
- and hhsend.c to cope properly with such addresses. Each of these calls
- routines in dlit.c to convert from YBTS addresses to domain literals and
- vice versa. dlit.c defines a table of networks and their DNIC's and gateway
- addresses, in order to do these conversions.
-
-
- UK-1.4 changes
- ==============
- Mailers.a: local mailer specification improved.
- Rules.a: Message-Id headers added, plus some other minor changes.
- dom/MAKE: minor bug fix, plus a minor internal change.
- chn/MAKE: Various internal changes. In particular, code has been added
- to trap unknown local domain errors.
- Support/muucp: A new version to fit in with the new version of ukuucp (v2.1).
- It also strips dupicate domains in the uucp from line.
- Support/bsmtp: This is now supplied with the package.
-
- Csnet-PhoneNet
- --------------
- A number of changes have been made to add support for CSNet PhoneNet mail,
- using the pmdf package.
-
-
- Upgrading from UK-1.2 to UK-1.4
- ===============================
- 1. Make a new directory for UK-1.4 and copy the chn and dom
- files that you made for UK-1.2 into the new direcories
-
- 2. Link chn/top.chn to dom/top.dom. Then run the dom/MAKE and chn/MAKE
- as before.
-
- 3. Run the top level MAKE. This is similar to the MAKE in UK-1.2.
- The main difference is that hosts without a Janet mailer have the
- option of understanding NRS format addresses.
-
- 4. (Uucp users) (optional, but recommended) Reinstall muucp.
- If you have SYSINFO defined in your uucp system, then by adding a
- line to your L.info such as: "uucphost O=A:Wk0900-1800"
- you can make demand driven mail-only calls to that system. See the
- uucp documentation for details.
- To use this, the "-r" option must be removed from the luucpm.m4 and/or
- uucpm.m4 files.
-
- 5. (Janet users) (optional, but recommended) Reinstall mailer and hhsend,
- which can now both cope with domain literals, as follows:
- a) edit dlit.c and change the table "nets" to reflect your
- view of the X25 world.
- b) make mailer and hhsend.
-
- 6. You can now make the sendmail.cf file in the usual way.
-
- Upgrading from UK-1.3 to UK-1.4
- ===============================
- 1. Either follow steps 1 - 3 in the previous section, or
- a) replace the following files in you UK-1.3 directory with the
- new ones in this package: dom/MAKE, chn/MAKE, Rules.a and Mailers.a
-
- b) recompile your channel table(s) with the new chn/MAKE
-
- c) (optional) recompile your domain table(s) with the new dom/MAKE
-
- d) cd to each of the host directories and run the two commands:
- ar x ../Rules.a
- ar x ../Mailers.a *m.m4
-
- 2. (uucp users) (optional, but recommended) Reinstall muucp, as
- described in step 4 of the previous section. (This was supplied
- as fix #4 in 1.3, so you may have already done this).
-
- 3. (janet users) If you are running the new D2.2 York code distribution
- then recompile hhsend with the -DYORKD2_2 flag.
-
- 4. You can now make the sendmail.cf file in the usual way.
-
- Problems/Comments to: uk-sendmail-workers@uk.ac.hw.cs or
- uk-sendmail-workers@cs.hw.ac.uk
- SHAR_EOF
- if test 3876 -ne "`wc -c Upgrade`"
- then
- echo shar: error transmitting Upgrade '(should have been 3876 characters)'
- fi
- echo shar: extracting MAKE '(4821 characters)'
- cat << \SHAR_EOF > MAKE
- #!/bin/sh
-
- echo 'Sendmail initial configuration program UK-1.4
- '
-
- ether=
- ethername=
- uucp=
- uucpname=
- janet=
- janetname=
- bitnet=
- bitnetname=
- csnet=
- csnetname=
- nonrsformat=
-
- #
- # gather site dependant information about names and mailers
- #
- host=`(hostname) 2> /dev/null || (uuname -l) 2> /dev/null`
- site=$host
-
- echo -n "Enter hostname ($host): "
- read reply
- if [ -n "$reply" ]
- then
- host=$reply
- fi
-
- echo -n "Enter sitename ($site): "
- read reply
- if [ -n "$reply" ]
- then
- site=$reply
- fi
-
- echo -n "
- Is this a multihost site, where a collection of hosts
- are made to look like one site? (y|n) "
- read reply
- if [ "$reply" = "y" ]
- then
- echo -n "Complete domain name: $host."
- multihost='(multihost site)'
- else
- echo -n "Enter domain name: "
- fi
- read domain
-
- echo -n "
- Host name = $host, Site name = $site, Domain name = $domain ${multihost}
- confirm? (y|n) "
-
- read reply
- if [ "$reply" != 'y' ]
- then
- echo 'Start again'
- exit 1
- fi
-
- echo "
- A list of available mailer configurations will follow
- type 'y' at the prompt to include the specified mailer.
- "
-
- echo -n "ethernet? "
- read reply
- if [ "$reply" = 'y' ]
- then
- ether=etherm.m4
- echo -n "Domain name on ethernet channel ($domain): "
- read ethername
- if [ -z "$ethername" ]
- then
- ethername=\$J
- fi
- fi
-
- echo -n "local uucp? "
- read reply
- if [ "$reply" = 'y' ]
- then
- luucp=luucpm.m4
- echo -n "Domain name on local uucp channel ($domain): "
- read luucpname
- if [ -z "$luucpname" ]
- then
- luucpname=\$J
- fi
- fi
-
- echo -n "uucp? "
- read reply
- if [ "$reply" = 'y' ]
- then
- uucp=uucpm.m4
- echo -n "Domain name on uucp channel ($domain): "
- read uucpname
- if [ -z "$uucpname" ]
- then
- uucpname=\$J
- uucpsysname=`uuname -l`
- else
- uucpsysname=`echo $uucpname | sed 's/\..*//'`
- fi
-
- echo -n "uucp system name ($uucpsysname): "
- read reply
- if [ -n "$reply" ]
- then
- uucpsysname=$reply
- fi
- fi
-
- echo -n "janet? "
- read reply
- if [ "$reply" = 'y' ]
- then
- janet=hhcpm.m4
- echo -n "Domain name on janet channel (in 822 format) ($domain): "
- read janetname
- if [ -z "$janetname" ]
- then
- janetname=\$J
- fi
- fi
-
- echo -n "bitnet? "
- read reply
- if [ "$reply" = 'y' ]
- then
- bitnet=bitnetm.m4
- echo -n "Domain name on bitnet channel ($domain): "
- read bitnetname
- if [ -z "$bitnetname" ]
- then
- bitnetname=\$J
- fi
- fi
-
- echo -n "csnet? "
- read reply
- if [ "$reply" = 'y' ]
- then
- csnet=pmdfm.m4
- echo -n "Domain name on csnet channel ($domain): "
- read csnetname
- if [ -z "$csnetname" ]
- then
- csnetname=\$J
- fi
- fi
-
- #
- # if janet isn't defined, see if NRS domain ordering is required anyway
- #
- if [ -z "$janetname" ]
- then echo -n "
- Do you need to understand NRS domain ordering? (y|n) "
- read reply
- if [ $reply = 'n' ]
- then
- nonrsformat=true
- fi
- fi
-
- #
- # now start creating the files
- #
- echo -n "
- Making directory $host... "
- if mkdir $host
- then
- cd $host
- else
- echo mkdir failed, aborted
- exit 1
- fi
-
- echo -n '
- creating rules... '
- ar x ../Rules.a
- echo -n '
- creating mailers... '
- ar x ../Mailers.a localm.m4 $ether $luucp $uucp $janet $bitnet $csnet
-
- echo -n '
- creating Makefile... '
- cat >Makefile <<EOF
- #######################################################################
- #
- # Makefile for Sendmail configuration files
- #
- # @(#)Makefile UK-1.4 sendmail configuartion 12/2/86
- #
- #######################################################################
- HOST=$host
- SITE=$site
- RULES=base.m4 rules.m4 rules1.m4 version.m4
- MAILERS=localm.m4 $ether $luucp $uucp $janet $bitnet $csnet
-
- EOF
-
- cat >>Makefile <<'EOF'
- .SUFFIXES: .mc .cf
-
- .mc.cf:
- m4 $*.mc > $*.cf
-
- $(HOST).cf: $(RULES) $(MAILERS) $(SITE).dom $(HOST).chn
-
- $(SITE).dom: ../dom/$(SITE).dom
- cp ../dom/$(SITE).dom $(SITE).dom
-
- $(HOST).chn: ../chn/$(HOST).chn
- cp ../chn/$(HOST).chn $(HOST).chn
-
- install: $(HOST).cf
- sed -e '/^#/d' -e '/^$$/d' $(HOST).cf > /usr/lib/sendmail.cf
- -if [ -f /usr/lib/sendmail.fc ]; then /usr/lib/sendmail -bz; fi
- EOF
-
- echo -n "
- creating $host.mc... "
- cat >$host.mc <<EOF
- define(\`HOST',\`$host')
- define(\`SITE',\`$site')
- define(\`DOMAIN',\`$domain')
- EOF
-
- if [ -n "$multihost" ]
- then
- echo "define(\`MULTIHOST')" >> $host.mc
- fi
-
- if [ -z "$nonrsformat" ]
- then
- echo "define(\`NRSFORMAT')" >> $host.mc
- fi
-
- if [ -n "$ethername" ]
- then
- echo "define(\`ETHERNAME',\`$ethername')" >> $host.mc
- fi
-
- if [ -n "$luucpname" ]
- then
- echo "define(\`LUUCPNAME',\`$luucpname')" >> $host.mc
- fi
-
- if [ -n "$uucpname" ]
- then
- echo "define(\`UUCPNAME',\`$uucpname')" >> $host.mc
- echo "define(\`UUCPSYSNAME',\`$uucpsysname')" >> $host.mc
- fi
-
- if [ -n "$janetname" ]
- then
- echo "define(\`JANETNAME',\`$janetname')" >> $host.mc
- fi
-
- if [ -n "$bitnetname" ]
- then
- echo "define(\`BITNETNAME',\`$bitnetname')" >> $host.mc
- fi
-
- if [ -n "$csnetname" ]
- then
- echo "define(\`CSNETNAME',\`$csnetname')" >> $host.mc
- fi
-
- echo 'include(base.m4)' >> $host.mc
-
- echo "
- Initial configuration complete.
-
- You now have to make the $site.dom and $host.chn files.
- "
-
- exit
- SHAR_EOF
- if test 4821 -ne "`wc -c MAKE`"
- then
- echo shar: error transmitting MAKE '(should have been 4821 characters)'
- else
- chmod a+x MAKE
- fi
- echo shar: extracting Mailers.a '(7336 characters)'
- cat << \SHAR_EOF > Mailers.a
- !<arch>
- bitnetm.m4 508594634 217 4 100644 959 `
- ###############################################################################
- ###############################################################################
- #####
- ##### Bitnet Mailer specification
- #####
- ##### @(#)bitnetm.m4 UK-1.4 sendmail configuration 12/2/86
- #####
- ###############################################################################
- ###############################################################################
-
- Mbitnet, P=/usr/bin/vmcopy, F=SnsFDMR, S=25, R=25,
- A=vmcopy $u@$h class=M fname=MAILER ftype=MAIL width=80 device=PUNCH
-
- S25
-
- R$+@$+ $@$1@$2 return user@domain
- R$+ $@$1@BITNETNAME add local domain name
-
-
- ##################################################################
- #####
- ##### Arpa/Uucp Mail Via Batched Simple Mail Transfer Protocol
- #####
- ##################################################################
-
- Mbsmtp, P=/usr/local/lib/rscs/bsmtp, F=SnsmFDMRuhX, S=25, R=25, M=100000,
- A=bsmtp $h BITNETNAME $g $u
-
- etherm.m4 508594635 217 4 100644 562 `
- ###############################################################################
- ###############################################################################
- #####
- ##### Ethernet Mailer specification
- #####
- ##### @(#)etherm.m4 UK-1.4 sendmail configuration 12/2/86
- #####
- ###############################################################################
- ###############################################################################
-
- Mether, P=[IPC], F=nsmFDMRuXC, S=21, R=2, A=IPC $h
-
- S21
- R$+@$+ $@$1@$2 address ok
- R$+ $@$1@ETHERNAME add local hostname
- hhcpm.m4 508594636 217 4 100644 681 `
- ###############################################################################
- ###############################################################################
- #####
- ##### Janet Mailer specification
- #####
- ##### @(#)hhcpm.m4 UK-1.4 sendmail configuration 12/2/86
- #####
- ###############################################################################
- ###############################################################################
-
- Mhhcp, P=/usr/lib/x25/hhsend, F=nsmFDMxVu, S=24, R=24, M=100000,
- A=hhsend $h $u
-
- S24
- R$+@[$+] $@$1@[$2] domain literals
- R$+@$+ $@$>9$1@$2 RFC822 -> NRS style
-
- R$+ $:$1@JANETNAME user -> user@mydomain
- R$+@$+ $@$>9$1@$2 RFC822 -> NRS style
-
- localm.m4 508594637 217 4 100644 1321 `
- ###############################################################################
- ###############################################################################
- #####
- ##### Local and Program Mailer specification
- #####
- ##### @(#)localm.m4 UK-1.4 sendmail configuration 12/2/86
- #####
- ###############################################################################
- ###############################################################################
-
- Mlocal, P=/bin/mail, F=rnlsmFDR, S=20, R=20, A=mail -d $u
- Mbinmail, P=/bin/mail, F=rnlsmFDR, S=20, R=20, A=mail -d $u
- Mprog, P=/bin/sh, F=nlsFDR, S=20, R=20, A=sh -c $u
-
- #
- # Apparent uucp addresses are converted back to old style so that
- # ucb-mail can cope with replies.
- # Otherwise addresses are presented as fully qualified domain names.
- #
- S20
-
- R@ MAILER-DAEMON errors to mailer-daemon
- R~$+ $1 remove '~' in To: line
- R$+@[$+] $@$1@[$2] domain literals
-
- # we assume an address is a uucp address if it contains more than two
- # hostnames (as opposed to domain names). This is not always right..
- R$+%$-%$-@$+ $:$>12$1%$2%$3@$4 strip outer domain name
- R$+%$-%$-@$+ $@$>8$1%$2%$3@$4 convert to uucp address
-
- ifdef(`NRSFORMAT',`
- # comment out next line if you want addresses presented in 822 format
- R$+@$-.$+ $@$>9$1@$2.$3 convert to NRS domain ordering')
-
- luucpm.m4 508594638 217 4 100644 608 `
- ###############################################################################
- ###############################################################################
- #####
- ##### Local UUCP Mailer specification
- #####
- ##### @(#)luucpm.m4 UK-1.4 sendmail configuration 12/2/86
- #####
- ###############################################################################
- ###############################################################################
-
- Mluucp, P=/usr/lib/uucp/muucp, F=nsmFDMRuh, S=22, R=22, M=100000,
- A=muucp -gA -f$g -H$j $h $u
-
- S22
- R$+@$+ $@$1@$2 address ok
- R$+ $@$1@LUUCPNAME add local hostname
- pmdfm.m4 508594639 217 4 100644 618 `
- ###############################################################################
- ###############################################################################
- #####
- ##### CSNet PhoneNet Mailer specification
- #####
- ##### @(#)pmdfm.m4 UK-1.4 sendmail configuration 12/2/86
- #####
- ###############################################################################
- ###############################################################################
-
- Mpmdf, P=/usr/local/lib/pmdf/pmdf-submit, F=nsmFDMR, S=26, R=26, M=100000,
- A=pmdf-submit -f $g $u
-
- S26
- R$+@$+ $@$1@$2 address ok
- R$+ $@$1@CSNETNAME add local domain name
- uucpm.m4 508594640 217 4 100644 754 `
- ###############################################################################
- ###############################################################################
- #####
- ##### UUCP Mailer specification
- #####
- ##### @(#)uucpm.m4 UK-1.4 sendmail configuration 12/2/86
- #####
- ###############################################################################
- ###############################################################################
-
- Muucp, P=/usr/lib/uucp/muucp, F=nsmFDMRuh, S=23, R=23, M=100000,
- A=muucp -r -gA -f$f@UUCPNAME -H$U $h $u
-
- #
- # Addresses are kept in percent style, rather than 822 style as sendmail
- # can't produce a correct routed 822 address from another style
- #
- S23
- R$+@$+ $@$1@$2 address ok
- R$+ $@$1@UUCPNAME add local hostname
- luucpm.m4.old 508594686 217 4 100644 594 `
- ###############################################################################
- ###############################################################################
- #####
- ##### Local UUCP Mailer specification
- #####
- ##### @(#)luucpm.m4 UK-1.4 sendmail configuration 12/2/86
- #####
- ###############################################################################
- ###############################################################################
-
- Mluucp, P=/usr/bin/uux, F=smFDMRuh, S=22, R=22, M=100000,
- A=uux - $h!rmail ($u)
-
- S22
- R$+@$+ $@$1@$2 address ok
- R$+ $@$1@LUUCPNAME add local hostname
- uucpm.m4.old 508594687 217 4 100644 688 `
- ###############################################################################
- ###############################################################################
- #####
- ##### UUCP Mailer specification
- #####
- ##### @(#)uucpm.m4 UK-1.4 sendmail configuration 12/2/86
- #####
- ###############################################################################
- ###############################################################################
-
- Muucp, P=/usr/bin/uux, F=sFDMRuh, S=23, R=23, M=100000,
- A=uux - -r -gA $h!rmail ($u)
-
- #
- # Addresses are converted back to uucp style.
- #
- S23
- R$+@$+ $:$>8$1@$2 convert to uucp style
- R$+!$+ $@$1!$2 address ok
- R$+ $@UUCPNAME!$1 add local domain name
- SHAR_EOF
- if test 7336 -ne "`wc -c Mailers.a`"
- then
- echo shar: error transmitting Mailers.a '(should have been 7336 characters)'
- fi
- echo shar: extracting Rules.a '(13336 characters)'
- cat << \SHAR_EOF > Rules.a
- !<arch>
- base.m4 508594731 217 4 100644 3142 `
- ##################################################################
- ##################################################################
- #####
- ##### SENDMAIL CONFIGURATION FILE UK-1.4
- #####
- ##### Copyright Jim Crammond, Heriot-Watt University. Feb. 1986.
- #####
- ##### This configuration file maybe be freely distributed,
- ##### provided no profit is gained by doing so.
- #####
- ##################################################################
- ##################################################################
-
- ##################################################################
- `###' HOST configuration file
- ##################################################################
-
- # offical site domain name
- DJ`'DOMAIN
-
- # offical host domain name
- ifdef(`MULTIHOST',`Dj$w.$J',`Dj$J')
-
- # uucp hostname
- ifdef(`UUCPNAME',DU`'UUCPSYSNAME)
-
- ############################################################
- #
- # General configuration information
- #
- ############################################################
-
- include(version.m4)
-
- ##########################
- ### Special macros ###
- ##########################
-
- # my name
- DnMAILER-DAEMON
- # UNIX header format
- DlFrom $g $d remote from $U
- # delimiter (operator) characters (note '~' has been added)
- Do.:%@!^=/[]~
- # format of a total name
- Dq$?x$x $.<$g>
- # SMTP login message
- De$j Sendmail $v/$V ready at $b
-
- ###################
- ### Options ###
- ###################
-
- # location of alias file
- OA/usr/lib/aliases
- # default delivery mode (deliver in background)
- Odbackground
- # mail to me too (needed for multihost sites)
- Om
- # (don't) connect to "expensive" mailers
- #Oc
- # temporary file mode
- OF0644
- # default GID
- Og1
- # location of help file
- OH/usr/lib/sendmail.hf
- # log level
- OL9
- # default messages to old style
- Oo
- # queue directory
- OQ/usr/spool/mqueue
- # read timeout -- violates protocols
- Or2h
- # status file
- OS/usr/lib/sendmail.st
- # queue up everything before starting transmission
- # Os
- # default timeout interval
- OT3d
- # time zone names (V6 only)
- # OtGMT,BST
- # default UID
- Ou1
- # wizard's password
- OWz3GvK.dPUxieQ
- # load averages at which to start queuing/refuse connections
- Ox8
- OX12
-
- ###############################
- ### Message precedences ###
- ###############################
-
- Pfirst-class=0
- Pspecial-delivery=100
- Pjunk=-100
-
- #########################
- ### Trusted users ###
- #########################
-
- Troot
- Tdaemon
- Tuucp
- Tjim
-
- #############################
- ### Format of headers ###
- #############################
-
- H?F?From: $q
- H?D?Date: $a
- H?M?Message-Id: <$p.$t@$j>
- H?F?Resent-From: $q
- H?D?Resent-Date: $a
- H?M?Resent-Message-Id: <$p.$t@$j>
- HSubject:
- H?R?Received: $?sfrom $s by $j; $b$.
- H?V?Via: $?s$s; $b$.
-
-
- ##########################
- ### The Rulesets ###
- ##########################
- include(rules.m4)
- include(rules1.m4)
- include(SITE.dom)
- include(HOST.chn)
-
- #########################
- ### The Mailers ###
- #########################
- include(localm.m4)
- ifdef(`ETHERNAME',`include(etherm.m4)')
- ifdef(`LUUCPNAME',`include(luucpm.m4)')
- ifdef(`UUCPNAME',`include(uucpm.m4)')
- ifdef(`JANETNAME',`include(hhcpm.m4)')
- ifdef(`BITNETNAME',`include(bitnetm.m4)')
- ifdef(`CSNETNAME',`include(pmdfm.m4)')
- rules.m4 508594751 217 4 100644 3240 `
- ###############################################################################
- ###############################################################################
- #####
- ##### @(#)rules.m4 UK-1.4 sendmail configuration 12/2/86
- #####
- ##### The rulesets
- #####
- ###############################################################################
- ###############################################################################
-
- ###############################################
- # Ruleset 0 -- Select mailer to be used #
- ###############################################
- S0
-
- # strip local domain name(s)
- R$+@$+ $:$>15$1@$2
-
- # local mail
- R$- $#local$:$1 local mail - maybe aliased
- R~$- $#binmail$:$1 local mail - no aliasing
-
- #
- # convert domain address into "<address>host.network" triple
- #
- R$+@$+.$=T $:$>16$1@$2.$3 routing and address conversion
-
- # select mailer
- ifdef(`ETHERNAME',`
- R<$+>$-.ether $#ether$@$2$:$1 local ethernet mail
- ')
- ifdef(`LUUCPNAME',`
- R<~$+>$+.luucp <\\~$1>$2.luucp band-aid for uuxqt
- R<$+>$-.luucp $#luucp$@$2$:$1 local uucp mail
- ')
- ifdef(`UUCPNAME',`
- R<~$+>$+.uucp <\\~$1>$2.uucp band-aid for uuxqt
- R<$+>$-.uucp $#uucp$@$2$:$1 external uucp mail
- ')
- ifdef(`JANETNAME',`
- R<$+>$+.janet $#hhcp$@$2$:$1 janet mail
- R$+@[$+] $#hhcp$@[$2]$:$1 pass domain literals to hhcp
- ')
- ifdef(`BITNETNAME',`
- R<$+>$-.bitnet $#bitnet$@$2$:$1 bitnet mail
- R<$+>$+.bsmtp $#bsmtp$@$2$:$1 arpa/uucp mail via bitnet
- ')
- ifdef(`CSNETNAME',`
- R<$+>$+.csnet $#pmdf$@$2$:$1 csnet mail
- ')
-
- # anything else with an '@' in is an error
- R$+@$+ $#error$:Domain Unknown
-
- # anything else - e.g. filenames, pipes etc goes to local mailer
- R$+ $#local$:$1 local
-
-
- ###############################################
- # Ruleset 1 -- Sender Field Pre-rewriting #
- ###############################################
- S1
-
-
- ##################################################
- # Ruleset 2 -- Recipient Field Pre-rewriting #
- ##################################################
- S2
-
-
- ##########################################
- # Ruleset 3 -- Name Canonicalisation #
- ##########################################
- S3
-
- # handle special cases
- R$- $@$1 return "user"
- R~$- $@~$1 return "~ user"
- R<> $@@ turn null into magic token
-
- # basic textual canonicalisation
- R$*<$*>$* $2 basic RFC 822 parsing
- R$+ at $+ $1@$2 " at " -> "@" for RFC 822
- R$+%$+ $1@$2 convert '%'s to '@'s
- R$+@$+@$+ $1%$2@$3 then reduce to only one '@'
-
- # Address conversions. See rules1.m4 for the gory details
- R@$+:$+ $:$>5@$1:$2 RFC822 to Percent form
- R$+!$+ $:$>7$1!$2 uucp to Percent form
-
- ifdef(`NRSFORMAT',`
- R$+@$+.$+ $:$>13$1@$2.$3 NRS ordering to 822 ordering
- ')
-
- `#' Domain name expansion. See SITE`'.dom for the details
- R$+@$+ $:$>11$1@$2 expand incomplete domain names
- R$+@$+ $:$>10$1@$2 do domain name aliases
-
-
- ###############################################
- # Ruleset 4 -- Final Output Post-rewriting #
- ###############################################
-
- # header rewriting is done in the per-mailer rulesets.
-
- S4
- R@ $@ handle <> error addr
- R$+@$+ $@$1@$2 already ok
-
- # this ensures that $u has at least one '@' in (if percent style)
- R$+%$+ $1@$2 convert '%'s to '@'s
- R$+@$+@$+ $1%$2@$3 then reduce to only one '@'
- rules1.m4 508594753 217 4 100644 3447 `
- ###############################################################################
- ###############################################################################
- #####
- ##### @(#)rules1.m4 UK-1.4 sendmail configuration 12/2/86
- #####
- ##### Address conversion rulesets
- #####
- ###############################################################################
- ###############################################################################
-
-
- ########################################################
- # Ruleset 5 -- RFC source routing -> Percent style #
- ########################################################
-
- #
- # convert a routed address in RFC822 form to Percent form
- # e.g. @ucl-cs.arpa,@kcl-cs.uucp:jim@hwcs.uucp ->
- # jim%hwcs.uucp%kcl-cs.uucp@ucl-cs.arpa
- #
- S5
-
- R$+,$+ $1:$2 @a,@b,@c:u%d -> @a:@b:@c:u%d
- R$*@$* $1%$2 @a:@b:@c:u@d -> %a:%b:%c:u%d
-
- R%$+:$+ $:$2@$1 %a:%b:%c:u%d -> %b:%c:u%d@a
- R%$+:$+@$+ $2@$1@$3 %b:%c:u%d@a -> u%d@c@b@a
- R$+@$+@$+ $1%$2@$3 u%d@c@b@a -> u%d%c%b@a
-
- ##############################################################
- # Ruleset 6 -- Percent style source routing -> RFC style #
- ##############################################################
-
- #
- # convert a routed address in the Percent form to RFC822 form
- # e.g. jim%hwcs.uucp%kcl-cs.uucp@ucl-cs.arpa ->
- # @ucl-cs.arpa,@kcl-cs.uucp:jim@hwcs.uucp
- # DONT USE THIS RULE!
- # Since the rulesets are not given the whole header field, we
- # can't tell whether or not to add brackets (and a phrase)
- S6
-
- R$+@$+ $1%$2 u%d%c%b@a -> u%d%c%b%a
- R$+%$+%$+ $:@$3:$1@$2 u%d%c%b%a -> @c%b%a:u@d
- R$+%$+:$+ @$2:$1:$3 @c%b%a:u%d -> @a:@b:@c:u@d
- R$+:$+:$+ $1,$2:$3 @a:@b:@c:u@d -> @a,@b,@c:u@d
-
- ###############################################################
- # Ruleset 7 -- uucp style source routing -> Percent style #
- ###############################################################
-
- #
- # convert an address in uucp form to Percent form
- # e.g. kcl-cs.uucp!hwcs.uucp!jim -> jim%hwcs.uucp@kcl-cs.uucp
- #
- # also converts mixed addresses, giving '@' and '%' priority over '!'
- # e.g. hwcs!jim%kcl-cs.uucp@ucl-cs.arpa -> jim%hwcs%kcl-cs.uucp@ucl-cs.arpa
- #
- S7
-
- # handle mixed addresses (with '!'s, '@'s and maybe '%'s in)
- R$+!$+%$+ $1!$2@$3 c!d!u%b@a -> c!d!u@b@a
- R$+!$+@$+ $2@$1@$3 c!d!u@b@a -> u@d@c@b@a
-
- # handle pure uucp addresses
- R$+!$+ $:$2@$1 a!b!c!d!u -> b!c!d!u@a
- R$+!$+@$+ $2@$1@$3 b!c!d!u@a -> u@d@c@b@a
-
- R$+@$+@$+ $1%$2@$3 u@d@c@b@a -> u%d%c%b@a
-
- ###############################################################
- # Ruleset 8 -- Percent style to uucp style source routing #
- ###############################################################
-
- #
- # convert a Percent style address to uucp (domain1!domain2!user) form
- # e.g. jim%hwcs.uucp@kcl-cs.uucp -> kcl-cs.uucp!hwcs.uucp!jim
- #
- S8
-
- R$+%$+ $1@$2 u%d%c%b@a -> u@d@c@b@a
- R$+@$+ $:$2!$1 u@d@c@b@a -> d@c@b@a!u
- R$+@$+!$+ $2!$1!$3 d@c@b@a!u -> a!b!c!d!u
-
- ifdef(`NRSFORMAT',`
- #####################################################
- # Ruleset 9 -- NRS <-> RFC822 domain conversion #
- #####################################################
-
- #
- # swap the order of the sub-domains around.
- # e.g. steve@uk.ac.ucl-cs.44d => steve@44d.ucl-cs.ac.uk
- #
- # this assumes that no colons will appear in the rhs of the domain address
- #
- S9
-
- R$*@$+.$+ $1@$2:$3 u@a.b.c.d -> u@a:b:c:d
- R$*@$-:$+ $:$1@$3.$2 u@a:b:c:d -> u@b:c:d.a
- R$*@$-:$+.$+ $1@$3.$2.$4 u@b:c:d.a -> u@d.c.b.a
- ')
-
- version.m4 508594758 217 4 100644 3257 `
- #
- # @(#)version.m4 UK-1.4 sendmail configuration 12/2/86
- #
-
- DVUK-1.4
-
- #
- # UK-1.4 12/2/86 jim
- # COMMENTS:
- # Added code to catch unknown local subdomains as errors.
- # Added support for CSNet PhoneNet mailer.
- # Merged barpa and buucp mailers into one bsmtp mailer (bitnet).
- # Delay use of bitnet general rule in the same way as for janet.
- # Added Message-Id header specification; generated for non-local mail.
- # Changed local mailer specification to give fully qualified names
- # except on uucp bang paths where domain is stripped.
- # Changed "-f" argument to muucp from $f to $g.
- # Changed "h" mailer flag to "u" in Janet mailer.
- #
- # UK-1.3 8/9/85 jim
- # COMMENTS:
- # Delay use of general rule for janet mailer until no specific
- # rule matches in uk domain.
- # NRS domain order handling now ifdef-ed NRSFORMAT; thus separating
- # it from Janet mailer specific code
- # Domain literals now accepted & passed to Janet mailer.
- # Set "metoo" option. Helps with multihost sites that talk SMTP.
- # Set "x" & "X" options (load averages) for newer versions of sendmail
- #
- # UK-1.2 9/6/85 jim
- # COMMENTS:
- # Bug fix: SMTP won't talk between local hosts of a multihost site.
- # use $J to define site domain name, $j is the host domain name.
- # Renumbered rulesets:
- # Rulesets 0 - 4 : basic rulesets
- # Rulesets 5 - 9 : address conversions
- # Rulesets 10 - 13 : domain name handling
- # Rulesets 15 - 17 : channel routing
- # Rulesets 20 - 25 : mailer specifications
- # Reorganised channel routing to allow multiple names for local domain
- # and to retry the main routing ruleset, with higher level domains
- # when no match is found, before trying top level domain relaying.
- # Each mailer channel can now have a different local domain name
- # (default is official name - $J). Multihost stuff simplified.
- # New uucp front end program replaces uux. Produces the correct from line.
- #
- #
- # UK-1.1 22/4/85 jim
- # COMMENTS:
- # Changed janet rules in ruleset 3 to cope properly with domain expansion.
- # Changed output of ruleset 9 (channel ruleset) so that ruleset 0
- # can parse multiple-token hostnames. Support files for janet added.
- # Renamed janet mailer to "hhcp". Added 'n' mailer flag to prog mailer.
- # Added ruleset 8 to detect and convert NRS style domains to 822 style.
- #
- # UK-1.0 26/3/85 jim
- # COMMENTS:
- # Some rearranging. Removed ruleset 8 (path optimisation) as it
- # optimised munged addresses away completely!
- # Ruleset 4 ensures an '@' in Percent style address.
- # Uucp ruleset rewritten to get as close to the uucp transmission
- # standard as sendmail allows.
- #
- # HW-5.1 1/3/85 jim
- # COMMENTS:
- # Fixed bug with mailing to filenames. Other cleanup for
- # distribution version.
- #
- # HW-5.0 26/2/85 jim
- # COMMENTS:
- # major restructuring: rewrote ruleset 3 which now converts
- # all addresses to one style. Added bitnet mailer and ether mailer
- # Rewrote all the mailer specs. Various other cleanups.
- #
- #
- # HW-4.3 10/1/85 jim
- # COMMENTS:
- # Cope with rfc822 style routing and renumber some rulesets
- #
- # HW-4.2 4/1/85 jim
- # COMMENTS:
- # Put in janet mailer definitions and rules
- #
- # HW-4.1 17/12/84 jim
- # COMMENTS:
- # Some modifications and cleanup for distribution
- #
- # HW-4.0 5/12/84 jim
- # COMMENTS:
- # This is a complete rewrite based on some ideas borrowed from
- # mmdf.
- #
-
- SHAR_EOF
- if test 13336 -ne "`wc -c Rules.a`"
- then
- echo shar: error transmitting Rules.a '(should have been 13336 characters)'
- fi
- # End of shell archive
- exit 0
-
-